<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
         padding: 0;
         margin: 0;
        }
        html{
            font-size:5.3333333333333vw;
        }
        /* vw这个单位相对于视口 */
        .box1{
            width: 1.2rem;
            height: 0.875rem;
            background-color: #bfa;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
</body>
</html>